import request from '@/utils/request';
import { parseStrEmpty } from '@/utils/ruoyi';


// 查询顾客分组列表
export function listCustomerGroup(query) {
  return request({
    url: '/customer/group/list',
    method: 'get',
    params: query,
  });
}

// 获取顾客分组详情
export function getCustomerGroup(groupId) {
  return request({
    url: '/customer/group/' + parseStrEmpty(groupId),
    method: 'get',
  });
}

// 新增顾客分组
export function addCustomerGroup(data) {
  return request({
    url: '/customer/group',
    method: 'post',
    data: data,
  });
}

// 修改顾客分组
export function updateCustomerGroup(data) {
  return request({
    url: '/customer/group',
    method: 'put',
    data: data,
  });
}

// 删除顾客分组
export function deleteCustomerGroupById(groupId) {
  return request({
    url: '/customer/group/' + groupId,
    method: 'delete',
  });
}

// 批量删除顾客分组
export function batchDeleteCustomerGroup(groupIds) {
  return request({
    url: '/customer/group',
    method: 'delete',
    data: groupIds,
  });
}
